package com.rt.tmpt.dao.intf;

import com.rt.tmpt.bean.A2Post;
import com.rt.tmpt.bean.A3Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IA2PostDao extends JpaRepository<A2Post, Long> {
    //List<A2Post> findByA2PostIsNullAndDeleteFlagOrderById(Integer deleteflag);

    @Query("from A2Post t1 where t1.deleteFlag=0 and a2Post is null and a2Company.id=:a2CompanyId")
    List<A2Post> findTopA2PostByA2CompanyId(@Param("a2CompanyId") long a2CompanyId);
}
